<template>
  <div>
    <h1>v-on事件绑定</h1>
    <button v-on:click="count = count + 1">增加{{count}}</button>
    <button v-on:click="addFn">增加{{count}}个</button>
    <button v-on:click="addCountFn(3)">一次性增加3个</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      count: 1
    }
  },
  methods: {
    addFn () {
      this.count += 1;
    },
    addCountFn (num) {
      this.count += num;
    }
  }
}
</script>

<style>
</style>